﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="ManageMaintainChannel.ascx.vb" Inherits="WebForm_ManageProduct_ManageMaintainChannel" %>
<%@ Register Namespace="My" TagPrefix="cc1" %>


<asp:Panel ID="plImportChannelData" runat="server" meta:resourcekey="plImportChannelData">
    <table cellpadding="0" cellspacing="0">
        <tr>
            <td align="left">
                <asp:Label ID="lblUploadFile" runat="server" meta:resourcekey="lblUploadFile"></asp:Label>
            </td>
            <td>
                <asp:FileUpload ID="FileUpload1" runat="server" />
                <asp:Button ID="btnImport" CssClass="button"  runat="server" meta:resourcekey="btnImport" />
            </td>
        </tr>
        <tr>
            <td align="left">
            </td>
            <td>
                <asp:HyperLink ID="hlinkExample" Font-Size="12px" meta:resourcekey="hlinkExample" NavigateUrl="~/Download/ImportChannel.xls" runat="server"></asp:HyperLink>
                <asp:Label ID="lblDescription" ForeColor="red" runat="server" meta:resourcekey="lblDescription"></asp:Label>
            </td>
         </tr>
    </table>
</asp:Panel>

<asp:Panel ID="plSelectChannel" runat="server" meta:resourcekey="plSelectChannel">
    <table cellpadding="0" cellspacing="0" width="50%">
        <tr>
            <td align="right">
                <asp:Label ID="lblDivision" runat="server" meta:resourcekey="lblDivision"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlDivision" runat="server" AutoPostBack="true" DataSourceID="sqlDivision" DataTextField="Text" DataValueField="Value" OnDataBound="ddlDivision_DataBound" OnSelectedIndexChanged="ddlDivision_SelectedIndexChanged"></asp:DropDownList>
                <asp:SqlDataSource ID="sqlDivision" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>" SelectCommand="Select Text,Value from CodeMapping where TableName='Product' and ColumnName='Division' and Active='Y' order by Sequence"></asp:SqlDataSource>
            </td>
            <td align="right">
                <asp:Label ID="lblBrand" runat="server" meta:resourcekey="lblBrand"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlBrand" runat="server" DataSourceID="sqlBrand" DataTextField="Brand" DataValueField="Brand" OnDataBound="ddlBrand_DataBound"></asp:DropDownList>
                <asp:SqlDataSource ID="sqlBrand" runat="server" ConnectionString="<%$ ConnectionStrings:connStr %>" SelectCommand="Select Distinct Brand from Channel Where Division = @Division">
                <SelectParameters>
                <asp:ControlParameter ControlID="ddlDivision" Name="Division" PropertyName="SelectedValue" />
                </SelectParameters>
                </asp:SqlDataSource>
            </td>
            <td>
                <asp:Button ID="btnSubmit" runat="server" meta:resourcekey="btnSubmit" />
              <%--  <asp:RequiredFieldValidator ID="rfvDivision" runat="server" meta:resourcekey="rfvDivision" SetFocusOnError="true" ValidationGroup="vSearch" ControlToValidate="ddlDivision" Display="None"></asp:RequiredFieldValidator>
                <asp:RequiredFieldValidator ID="rfvBrand" runat="server" meta:resourcekey="rfvBrand" SetFocusOnError="true" ValidationGroup="vSearch" ControlToValidate="ddlBrand" Display="None"></asp:RequiredFieldValidator>
                <asp:ValidationSummary ID="vs1" runat="server" ShowMessageBox="true" ValidationGroup="vSearch" ShowSummary="false" />--%>
            </td>
        </tr>
    </table>
</asp:Panel>

<asp:Panel ID="plChanelList" runat="server" meta:resourcekey="plChanelList">
    <My:MyGridView ID="gv" DataKeyNames="ID" runat="server" SkinID="pager" AllowHoverSelect="False" meta:resourcekey="gv" AllowHoverEffect="True">
        <Columns>
        <asp:TemplateField  meta:resourcekey="bfDivision">
                        
<ItemTemplate>
    <asp:Label ID="lblgvDivision" runat="server" Text='<%# Eval("Division") %>'></asp:Label>
</ItemTemplate> 
    <ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>

           <asp:BoundField DataField="Brand" meta:resourcekey="bfBrand" />
           <asp:BoundField DataField="Channel" meta:resourcekey="bfChannel" /> 
        </Columns>
    </My:MyGridView>
</asp:Panel>